An accelerator helps increase the efficiency of a computer performing a computational task. This can occur in one or a combination of two ways. First, the accelerator shares the computational burden of performing the task with a system processor of the computer, therefore dividing the work load. Second, the accelerator assumes the entire computational load of performing the task, where the accelerator is configured to perform the task with greater efficiency than the system processor. To be most effective in the second case, accelerators are usually optimized for performing specific computational tasks. In some instances, accelerators perform mathematical operations involving matrices.
In performing matrix operations, an accelerator can employ two types of algorithms. General algorithms work for a wide range of matrix types but come with the price of reduced computational efficiency as compared to specialized algorithms. Specialized algorithms, while computationally more efficient, are only compatible with certain matrix types. To determine whether or not a specialized algorithm can be used, an accelerator performs a battery of tests upon one or more matrices involved in a matrix operation.
Each test on a matrix adds to the computational overhead of performing the matrix operation, taking away from the efficiency of using a specialized algorithm. Additionally, tests are performed in serial, which further reduces any efficiency gained from using a specialized algorithm. When the accelerator cannot match the one or more matrices involved in a matrix operation with any tested matrix type for which a specialized algorithm could be used, a general algorithm is used. In such cases, the testing performed by the accelerator provides no return and actually results in an overall efficiency decrease for the matrix operation as compared to using the general algorithm without testing.
The present disclosure is illustrated in part with examples, as reflected by disclosed embodiments, and is not limited by the accompanying figures, in which like reference numbers indicate similar elements. Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to the dimensions of other elements to help to improve understanding of embodiments implicitly or explicitly disclosed herein.
The apparatus and method components have been represented, where appropriate, by conventional symbols in the drawings, showing only those specific details that are pertinent to understanding the embodiments of the present disclosure so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein. Also, the operations included in the flow diagrams do not imply a required order in performing the functionality contained therein.